package top.zsyle.sycc.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import top.zsyle.sycc.domain.CourseUserLearn;
import top.zsyle.sycc.mapper.CourseUserLearnMapper;
import top.zsyle.sycc.service.ICourseUserLearnService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhongshiyi
 * @since 2022-12-31
 */
@Service
public class CourseUserLearnServiceImpl extends ServiceImpl<CourseUserLearnMapper, CourseUserLearn> implements ICourseUserLearnService {

    @Override
    public CourseUserLearn byInfo(Long courseId,Long login_id) {
        Wrapper<CourseUserLearn> wrapper = new EntityWrapper<>();
        wrapper.eq("course_id",courseId);
        wrapper.eq("login_id",courseId);
        return selectOne(wrapper);
    }
}
